x11: Create empty cursor without old functions
authorBenjamin Otte <otte@redhat.com>
Fri, 6 Aug 2010 20:41:21 +0000 (22:41 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 10 Aug 2010 19:02:31 +0000 (21:02 +0200)
In particular, clear the bitmap manually instead of using
create_from_data.

gdk/x11/gdkcursor-x11.c

index a9373f660083cf2a88e91c219f9eaa1d8a0e18d3..ca3c05f6c1cee4b2d40bd900296d17ad96de34eb 100644 (file)
@@ -161,10 +161,15 @@ get_blank_cursor (GdkDisplay *display)
   Pixmap source_pixmap;
   XColor color;
   Cursor cursor;
+  cairo_t *cr;
 
   screen = gdk_display_get_default_screen (display);
-  pixmap = gdk_bitmap_create_from_data (gdk_screen_get_root_window (screen), 
-                                       "\0\0\0\0\0\0\0\0", 1, 1);
+  pixmap = gdk_pixmap_new (gdk_screen_get_root_window (screen), 1, 1, 1);
+  /* Clear Pixmap */
+  cr = gdk_cairo_create (pixmap);
+  cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
+  cairo_paint (cr);
+  cairo_destroy (cr);
  
   source_pixmap = GDK_PIXMAP_XID (pixmap);